var jump_page = 'Enter the page number you wish to go to:';
var on_page = '';
var per_page = '';
var base_url = '';
var style_cookie = 'phpBBstyle';
var style_cookie_settings = '; path=/; domain=.phpbb.com';
var onload_functions = new Array();
var onunload_functions = new Array();



function find_username(url)
{
  popup(url, 760, 570, '_usersearch');
  return false;
}

/**
 * New function for handling multiple calls to window.onload and window.unload by pentapenguin
 */
window.onload = function()
{
  for (var i = 0; i < onload_functions.length; i++)
  {
    eval(onload_functions[i]);
  }
}

window.onunload = function()
{
  for (var i = 0; i < onunload_functions.length; i++)
  {
    eval(onunload_functions[i]);
  }
}

onload_functions.push('apply_onkeypress_event()');

var form_name = 'postform';
var text_name = 'message';
var load_draft = false;
var upload = false;

// Define the bbCode tags
var bbcode = new Array();
var bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[flash=]', '[/flash]','[size=]','[/size]','[youku]','[/youku]','[google]','[/google]');
var imageTag = false;

// Helpline messages
var help_line = {
b: 'Bold text: [b]text[/b]',
   i: 'Italic text: [i]text[/i]',
   u: 'Underline text: [u]text[/u]',
   q: 'Quote text: [quote]text[/quote]',
   c: 'Code display: [code]code[/code]',
   l: 'List: [list]text[/list]',
   o: 'Ordered list: [list=]text[/list]',
   p: 'Insert image: [img]http://image_url[/img]',
   w: 'Insert URL: [url]http://url[/url] or [url=http://url]URL text[/url]',
   a: 'Inline uploaded attachment: [attachment=]filename.ext[/attachment]',
   s: 'Font colour: [color=red]text[/color]  Tip: you can also use color=#FF0000',
   f: 'Font size: [size=85]small text[/size]',
   e: 'List: Add list element',
   d: 'Flash: [flash=width,height]http://url[/flash]',
   u: 'Youku video:[youku]your video[/youku]',
   g: 'Google video:[google]your video[/google]'


}

var panels = new Array('options-panel', 'attach-panel', 'poll-panel');
var show_panel = 'options-panel';
function change_palette()
{
  dE('colour_palette');
  e = document.getElementById('colour_palette');

  if (e.style.display == 'block')
  {
    document.getElementById('bbpalette').value = 'Hide font colour';
  }
  else
  {
    document.getElementById('bbpalette').value = 'Font colour';
  }
}

